<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<TITLE>
HypergeometricDistribution (Commons Math 3.2 API)
</TITLE>


<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">

<SCRIPT type="text/javascript">
function windowTitle()
{
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="HypergeometricDistribution (Commons Math 3.2 API)";
    }
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>

</HEAD>

<BODY BGCOLOR="white" onload="windowTitle();">
<HR>


<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/HypergeometricDistribution.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../../org/apache/commons/math3/distribution/GammaDistribution.html" title="class in org.apache.commons.math3.distribution"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../../org/apache/commons/math3/distribution/IntegerDistribution.html" title="interface in org.apache.commons.math3.distribution"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../../index.html?org/apache/commons/math3/distribution/HypergeometricDistribution.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="HypergeometricDistribution.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#fields_inherited_from_class_org.apache.commons.math3.distribution.AbstractIntegerDistribution">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->

<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.apache.commons.math3.distribution</FONT>
<BR>
Class HypergeometricDistribution</H2>
<PRE>
<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A>
  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../../org/apache/commons/math3/distribution/AbstractIntegerDistribution.html" title="class in org.apache.commons.math3.distribution">org.apache.commons.math3.distribution.AbstractIntegerDistribution</A>
      <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.commons.math3.distribution.HypergeometricDistribution</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD><A HREF="http://download.oracle.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</A>, <A HREF="../../../../../org/apache/commons/math3/distribution/IntegerDistribution.html" title="interface in org.apache.commons.math3.distribution">IntegerDistribution</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public class <B>HypergeometricDistribution</B><DT>extends <A HREF="../../../../../org/apache/commons/math3/distribution/AbstractIntegerDistribution.html" title="class in org.apache.commons.math3.distribution">AbstractIntegerDistribution</A></DL>
</PRE>

<P>
Implementation of the hypergeometric distribution.
<P>

<P>
<DL>
<DT><B>Version:</B></DT>
  <DD>$Id: HypergeometricDistribution.java 1416643 2012-12-03 19:37:14Z tn $</DD>
<DT><B>See Also:</B><DD><a href="http://en.wikipedia.org/wiki/Hypergeometric_distribution">Hypergeometric distribution (Wikipedia)</a>, 
<a href="http://mathworld.wolfram.com/HypergeometricDistribution.html">Hypergeometric distribution (MathWorld)</a>, 
<A HREF="../../../../../serialized-form.html#org.apache.commons.math3.distribution.HypergeometricDistribution">Serialized Form</A></DL>
<HR>

<P>
<!-- =========== FIELD SUMMARY =========== -->

<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Field Summary</B></FONT></TH>
</TR>
</TABLE>
&nbsp;<A NAME="fields_inherited_from_class_org.apache.commons.math3.distribution.AbstractIntegerDistribution"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Fields inherited from class org.apache.commons.math3.distribution.<A HREF="../../../../../org/apache/commons/math3/distribution/AbstractIntegerDistribution.html" title="class in org.apache.commons.math3.distribution">AbstractIntegerDistribution</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../../org/apache/commons/math3/distribution/AbstractIntegerDistribution.html#random">random</A>, <A HREF="../../../../../org/apache/commons/math3/distribution/AbstractIntegerDistribution.html#randomData">randomData</A></CODE></TD>
</TR>
</TABLE>
&nbsp;
<!-- ======== CONSTRUCTOR SUMMARY ======== -->

<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/distribution/HypergeometricDistribution.html#HypergeometricDistribution(int, int, int)">HypergeometricDistribution</A></B>(int&nbsp;populationSize,
                           int&nbsp;numberOfSuccesses,
                           int&nbsp;sampleSize)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Construct a new hypergeometric distribution with the specified population
 size, number of successes in the population, and sample size.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/distribution/HypergeometricDistribution.html#HypergeometricDistribution(org.apache.commons.math3.random.RandomGenerator, int, int, int)">HypergeometricDistribution</A></B>(<A HREF="../../../../../org/apache/commons/math3/random/RandomGenerator.html" title="interface in org.apache.commons.math3.random">RandomGenerator</A>&nbsp;rng,
                           int&nbsp;populationSize,
                           int&nbsp;numberOfSuccesses,
                           int&nbsp;sampleSize)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new hypergeometric distribution.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/distribution/HypergeometricDistribution.html#calculateNumericalVariance()">calculateNumericalVariance</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Used by <A HREF="../../../../../org/apache/commons/math3/distribution/HypergeometricDistribution.html#getNumericalVariance()"><CODE>getNumericalVariance()</CODE></A>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/distribution/HypergeometricDistribution.html#cumulativeProbability(int)">cumulativeProbability</A></B>(int&nbsp;x)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;For a random variable <code>X</code> whose values are distributed according
 to this distribution, this method returns <code>P(X &lt;= x)</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/distribution/HypergeometricDistribution.html#getNumberOfSuccesses()">getNumberOfSuccesses</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Access the number of successes.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/distribution/HypergeometricDistribution.html#getNumericalMean()">getNumericalMean</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Use this method to get the numerical value of the mean of this
 distribution.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/distribution/HypergeometricDistribution.html#getNumericalVariance()">getNumericalVariance</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Use this method to get the numerical value of the variance of this
 distribution.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/distribution/HypergeometricDistribution.html#getPopulationSize()">getPopulationSize</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Access the population size.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/distribution/HypergeometricDistribution.html#getSampleSize()">getSampleSize</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Access the sample size.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/distribution/HypergeometricDistribution.html#getSupportLowerBound()">getSupportLowerBound</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Access the lower bound of the support.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/distribution/HypergeometricDistribution.html#getSupportUpperBound()">getSupportUpperBound</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Access the upper bound of the support.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/distribution/HypergeometricDistribution.html#isSupportConnected()">isSupportConnected</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Use this method to get information about whether the support is
 connected, i.e. whether all integers between the lower and upper bound of
 the support are included in the support.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/distribution/HypergeometricDistribution.html#probability(int)">probability</A></B>(int&nbsp;x)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;For a random variable <code>X</code> whose values are distributed according
 to this distribution, this method returns <code>P(X = x)</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/distribution/HypergeometricDistribution.html#upperCumulativeProbability(int)">upperCumulativeProbability</A></B>(int&nbsp;x)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;For this distribution, <code>X</code>, this method returns <code>P(X &gt;= x)</code>.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_org.apache.commons.math3.distribution.AbstractIntegerDistribution"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class org.apache.commons.math3.distribution.<A HREF="../../../../../org/apache/commons/math3/distribution/AbstractIntegerDistribution.html" title="class in org.apache.commons.math3.distribution">AbstractIntegerDistribution</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../../org/apache/commons/math3/distribution/AbstractIntegerDistribution.html#cumulativeProbability(int, int)">cumulativeProbability</A>, <A HREF="../../../../../org/apache/commons/math3/distribution/AbstractIntegerDistribution.html#inverseCumulativeProbability(double)">inverseCumulativeProbability</A>, <A HREF="../../../../../org/apache/commons/math3/distribution/AbstractIntegerDistribution.html#reseedRandomGenerator(long)">reseedRandomGenerator</A>, <A HREF="../../../../../org/apache/commons/math3/distribution/AbstractIntegerDistribution.html#sample()">sample</A>, <A HREF="../../../../../org/apache/commons/math3/distribution/AbstractIntegerDistribution.html#sample(int)">sample</A>, <A HREF="../../../../../org/apache/commons/math3/distribution/AbstractIntegerDistribution.html#solveInverseCumulativeProbability(double, int, int)">solveInverseCumulativeProbability</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ========= CONSTRUCTOR DETAIL ======== -->

<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="HypergeometricDistribution(int, int, int)"><!-- --></A><H3>
HypergeometricDistribution</H3>
<PRE>
public <B>HypergeometricDistribution</B>(int&nbsp;populationSize,
                                  int&nbsp;numberOfSuccesses,
                                  int&nbsp;sampleSize)
                           throws <A HREF="../../../../../org/apache/commons/math3/exception/NotPositiveException.html" title="class in org.apache.commons.math3.exception">NotPositiveException</A>,
                                  <A HREF="../../../../../org/apache/commons/math3/exception/NotStrictlyPositiveException.html" title="class in org.apache.commons.math3.exception">NotStrictlyPositiveException</A>,
                                  <A HREF="../../../../../org/apache/commons/math3/exception/NumberIsTooLargeException.html" title="class in org.apache.commons.math3.exception">NumberIsTooLargeException</A></PRE>
<DL>
<DD>Construct a new hypergeometric distribution with the specified population
 size, number of successes in the population, and sample size.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>populationSize</CODE> - Population size.<DD><CODE>numberOfSuccesses</CODE> - Number of successes in the population.<DD><CODE>sampleSize</CODE> - Sample size.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/apache/commons/math3/exception/NotPositiveException.html" title="class in org.apache.commons.math3.exception">NotPositiveException</A></CODE> - if <code>numberOfSuccesses &lt; 0</code>.
<DD><CODE><A HREF="../../../../../org/apache/commons/math3/exception/NotStrictlyPositiveException.html" title="class in org.apache.commons.math3.exception">NotStrictlyPositiveException</A></CODE> - if <code>populationSize &lt;= 0</code>.
<DD><CODE><A HREF="../../../../../org/apache/commons/math3/exception/NumberIsTooLargeException.html" title="class in org.apache.commons.math3.exception">NumberIsTooLargeException</A></CODE> - if <code>numberOfSuccesses &gt; populationSize</code>,
 or <code>sampleSize &gt; populationSize</code>.</DL>
</DL>
<HR>

<A NAME="HypergeometricDistribution(org.apache.commons.math3.random.RandomGenerator, int, int, int)"><!-- --></A><H3>
HypergeometricDistribution</H3>
<PRE>
public <B>HypergeometricDistribution</B>(<A HREF="../../../../../org/apache/commons/math3/random/RandomGenerator.html" title="interface in org.apache.commons.math3.random">RandomGenerator</A>&nbsp;rng,
                                  int&nbsp;populationSize,
                                  int&nbsp;numberOfSuccesses,
                                  int&nbsp;sampleSize)
                           throws <A HREF="../../../../../org/apache/commons/math3/exception/NotPositiveException.html" title="class in org.apache.commons.math3.exception">NotPositiveException</A>,
                                  <A HREF="../../../../../org/apache/commons/math3/exception/NotStrictlyPositiveException.html" title="class in org.apache.commons.math3.exception">NotStrictlyPositiveException</A>,
                                  <A HREF="../../../../../org/apache/commons/math3/exception/NumberIsTooLargeException.html" title="class in org.apache.commons.math3.exception">NumberIsTooLargeException</A></PRE>
<DL>
<DD>Creates a new hypergeometric distribution.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>rng</CODE> - Random number generator.<DD><CODE>populationSize</CODE> - Population size.<DD><CODE>numberOfSuccesses</CODE> - Number of successes in the population.<DD><CODE>sampleSize</CODE> - Sample size.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/apache/commons/math3/exception/NotPositiveException.html" title="class in org.apache.commons.math3.exception">NotPositiveException</A></CODE> - if <code>numberOfSuccesses &lt; 0</code>.
<DD><CODE><A HREF="../../../../../org/apache/commons/math3/exception/NotStrictlyPositiveException.html" title="class in org.apache.commons.math3.exception">NotStrictlyPositiveException</A></CODE> - if <code>populationSize &lt;= 0</code>.
<DD><CODE><A HREF="../../../../../org/apache/commons/math3/exception/NumberIsTooLargeException.html" title="class in org.apache.commons.math3.exception">NumberIsTooLargeException</A></CODE> - if <code>numberOfSuccesses &gt; populationSize</code>,
 or <code>sampleSize &gt; populationSize</code>.<DT><B>Since:</B></DT>
  <DD>3.1</DD>
</DL>
</DL>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="cumulativeProbability(int)"><!-- --></A><H3>
cumulativeProbability</H3>
<PRE>
public double <B>cumulativeProbability</B>(int&nbsp;x)</PRE>
<DL>
<DD>For a random variable <code>X</code> whose values are distributed according
 to this distribution, this method returns <code>P(X &lt;= x)</code>.  In other
 words, this method represents the (cumulative) distribution function
 (CDF) for this distribution.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>x</CODE> - the point at which the CDF is evaluated
<DT><B>Returns:</B><DD>the probability that a random variable with this
 distribution takes a value less than or equal to <code>x</code></DL>
</DD>
</DL>
<HR>

<A NAME="getNumberOfSuccesses()"><!-- --></A><H3>
getNumberOfSuccesses</H3>
<PRE>
public int <B>getNumberOfSuccesses</B>()</PRE>
<DL>
<DD>Access the number of successes.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>the number of successes.</DL>
</DD>
</DL>
<HR>

<A NAME="getPopulationSize()"><!-- --></A><H3>
getPopulationSize</H3>
<PRE>
public int <B>getPopulationSize</B>()</PRE>
<DL>
<DD>Access the population size.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>the population size.</DL>
</DD>
</DL>
<HR>

<A NAME="getSampleSize()"><!-- --></A><H3>
getSampleSize</H3>
<PRE>
public int <B>getSampleSize</B>()</PRE>
<DL>
<DD>Access the sample size.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>the sample size.</DL>
</DD>
</DL>
<HR>

<A NAME="probability(int)"><!-- --></A><H3>
probability</H3>
<PRE>
public double <B>probability</B>(int&nbsp;x)</PRE>
<DL>
<DD>For a random variable <code>X</code> whose values are distributed according
 to this distribution, this method returns <code>P(X = x)</code>. In other
 words, this method represents the probability mass function (PMF)
 for the distribution.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>x</CODE> - the point at which the PMF is evaluated
<DT><B>Returns:</B><DD>the value of the probability mass function at <code>x</code></DL>
</DD>
</DL>
<HR>

<A NAME="upperCumulativeProbability(int)"><!-- --></A><H3>
upperCumulativeProbability</H3>
<PRE>
public double <B>upperCumulativeProbability</B>(int&nbsp;x)</PRE>
<DL>
<DD>For this distribution, <code>X</code>, this method returns <code>P(X &gt;= x)</code>.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>x</CODE> - Value at which the CDF is evaluated.
<DT><B>Returns:</B><DD>the upper tail CDF for this distribution.<DT><B>Since:</B></DT>
  <DD>1.1</DD>
</DL>
</DD>
</DL>
<HR>

<A NAME="getNumericalMean()"><!-- --></A><H3>
getNumericalMean</H3>
<PRE>
public double <B>getNumericalMean</B>()</PRE>
<DL>
<DD>Use this method to get the numerical value of the mean of this
 distribution.

 For population size <code>N</code>, number of successes <code>m</code>, and sample
 size <code>n</code>, the mean is <code>n * m / N</code>.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>the mean or <code>Double.NaN</code> if it is not defined</DL>
</DD>
</DL>
<HR>

<A NAME="getNumericalVariance()"><!-- --></A><H3>
getNumericalVariance</H3>
<PRE>
public double <B>getNumericalVariance</B>()</PRE>
<DL>
<DD>Use this method to get the numerical value of the variance of this
 distribution.

 For population size <code>N</code>, number of successes <code>m</code>, and sample
 size <code>n</code>, the variance is
 <code>[n * m * (N - n) * (N - m)] / [N^2 * (N - 1)]</code>.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>the variance (possibly <code>Double.POSITIVE_INFINITY</code> or
 <code>Double.NaN</code> if it is not defined)</DL>
</DD>
</DL>
<HR>

<A NAME="calculateNumericalVariance()"><!-- --></A><H3>
calculateNumericalVariance</H3>
<PRE>
protected double <B>calculateNumericalVariance</B>()</PRE>
<DL>
<DD>Used by <A HREF="../../../../../org/apache/commons/math3/distribution/HypergeometricDistribution.html#getNumericalVariance()"><CODE>getNumericalVariance()</CODE></A>.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>the variance of this distribution</DL>
</DD>
</DL>
<HR>

<A NAME="getSupportLowerBound()"><!-- --></A><H3>
getSupportLowerBound</H3>
<PRE>
public int <B>getSupportLowerBound</B>()</PRE>
<DL>
<DD>Access the lower bound of the support. This method must return the same
 value as <code>inverseCumulativeProbability(0)</code>. In other words, this
 method must return
 <p><code>inf {x in Z | P(X <= x) > 0}</code>.</p>

 For population size <code>N</code>, number of successes <code>m</code>, and sample
 size <code>n</code>, the lower bound of the support is
 <code>max(0, n + m - N)</code>.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>lower bound of the support</DL>
</DD>
</DL>
<HR>

<A NAME="getSupportUpperBound()"><!-- --></A><H3>
getSupportUpperBound</H3>
<PRE>
public int <B>getSupportUpperBound</B>()</PRE>
<DL>
<DD>Access the upper bound of the support. This method must return the same
 value as <code>inverseCumulativeProbability(1)</code>. In other words, this
 method must return
 <p><code>inf {x in R | P(X <= x) = 1}</code>.</p>

 For number of successes <code>m</code> and sample size <code>n</code>, the upper
 bound of the support is <code>min(m, n)</code>.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>upper bound of the support</DL>
</DD>
</DL>
<HR>

<A NAME="isSupportConnected()"><!-- --></A><H3>
isSupportConnected</H3>
<PRE>
public boolean <B>isSupportConnected</B>()</PRE>
<DL>
<DD>Use this method to get information about whether the support is
 connected, i.e. whether all integers between the lower and upper bound of
 the support are included in the support.

 The support of this distribution is connected.
<P>
<DD><DL>

<DT><B>Returns:</B><DD><code>true</code></DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>


<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/HypergeometricDistribution.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../../org/apache/commons/math3/distribution/GammaDistribution.html" title="class in org.apache.commons.math3.distribution"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../../org/apache/commons/math3/distribution/IntegerDistribution.html" title="interface in org.apache.commons.math3.distribution"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../../index.html?org/apache/commons/math3/distribution/HypergeometricDistribution.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="HypergeometricDistribution.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#fields_inherited_from_class_org.apache.commons.math3.distribution.AbstractIntegerDistribution">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->

<HR>
Copyright &#169; 2003-2013 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.
</BODY>
</HTML>
